home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 125
/
Freelog_MarsAvril2015_No125.iso
/
Musique
/
Quod Libet
/
quodlibet-3.3.0-installer.exe
/
bin
/
quodlibet
/
plugins
/
gui.pyc
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2014-12-31
|
2KB
|
39 lines
# Source Generated with Decompyle++
# File: in.pyc (Python 2.7)
from quodlibet import config
from gi.repository import Gtk
class MenuItemPlugin(Gtk.ImageMenuItem):
'''
A base plugin that appears in a menu, typically
During plugin callbacks, `self.plugin_window` will be
available. This is the `Gtk.Window` that the plugin was invoked from.
It provides access to two important widgets, `self.plugin_window.browser`
and `self.plugin_window.songlist`.
'''
MAX_INVOCATIONS = config.getint('plugins', 'default_max_invocations', 30)
def __init__(self, window):
super(Gtk.ImageMenuItem, self).__init__(label = self.PLUGIN_NAME)
self.plugin_window = window
self._MenuItemPlugin__set_icon()
self._MenuItemPlugin__initialized = True
def __set_icon(self):
'''Sets the GTK icon for this plugin item'''
icon = getattr(self, 'PLUGIN_ICON', Gtk.STOCK_EXECUTE)
image = Gtk.Image.new_from_stock(icon, Gtk.IconSize.MENU) if Gtk.stock_lookup(icon) else Gtk.Image.new_from_icon_name(icon, Gtk.IconSize.MENU)
self.set_always_show_image(True)
self.set_image(image)
def initialized(self):
return self._MenuItemPlugin__initialized
initialized = property(initialized)